Skip to content

fix(event_handler): support finding type annotated resolver when merging schemas#8074

Merged
leandrodamascena merged 3 commits intoaws-powertools:developfrom
siwyd:fix/support-ast-annassign-openapi-merge
Apr 2, 2026
Merged

fix(event_handler): support finding type annotated resolver when merging schemas#8074
leandrodamascena merged 3 commits intoaws-powertools:developfrom
siwyd:fix/support-ast-annassign-openapi-merge

Conversation

@siwyd
Copy link
Copy Markdown
Contributor

@siwyd siwyd commented Mar 30, 2026

Issue number: closes #8073

Summary

Changes

Support type annotated resolver finding for OpenAPI merge.

User experience

Type annotated resolver was simply not found, now it is.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@siwyd siwyd requested a review from a team as a code owner March 30, 2026 16:04
@siwyd siwyd requested a review from anafalcao March 30, 2026 16:04
@boring-cyborg
Copy link
Copy Markdown

boring-cyborg bot commented Mar 30, 2026

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Mar 30, 2026
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 30, 2026
@siwyd siwyd changed the title Support finding type annotated resolver fix: support finding type annotated resolver Mar 30, 2026
@siwyd
Copy link
Copy Markdown
Contributor Author

siwyd commented Mar 31, 2026

@anafalcao Hi! I changed the PR title to try and pass the Semantic PR check, but it doesn't seem like it retriggers automatically? Can I trigger it myself somehow again?

@powertools-for-aws-oss-automation powertools-for-aws-oss-automation bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 2, 2026
@powertools-for-aws-oss-automation powertools-for-aws-oss-automation bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 2, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

@leandrodamascena leandrodamascena changed the title fix: support finding type annotated resolver fix(event_handler): support finding type annotated resolver when merging schemas Apr 2, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 96.65%. Comparing base (3f6fc29) to head (6a94d20).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...s_lambda_powertools/event_handler/openapi/merge.py 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #8074   +/-   ##
========================================
  Coverage    96.64%   96.65%           
========================================
  Files          282      282           
  Lines        13791    13798    +7     
  Branches      1102     1103    +1     
========================================
+ Hits         13329    13336    +7     
  Misses         339      339           
  Partials       123      123           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this @siwyd! I missed this when building this new feature.

I moved the test from unit to functional and added a new handler to test this. While your unit test was good, I prefer to have this as a function test and test the functionally working with a real Lambda.

APPROVED! Thanks a lot.

@leandrodamascena leandrodamascena requested a review from hjgraca April 2, 2026 15:22
@leandrodamascena leandrodamascena merged commit dafed6a into aws-powertools:develop Apr 2, 2026
19 of 22 checks passed
@boring-cyborg
Copy link
Copy Markdown

boring-cyborg bot commented Apr 2, 2026

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

@siwyd siwyd deleted the fix/support-ast-annassign-openapi-merge branch April 2, 2026 19:00
@siwyd
Copy link
Copy Markdown
Contributor Author

siwyd commented Apr 2, 2026

@leandrodamascena Thanks for the quick merge. Yeah, functional test makes sense, that better replicates my confusion when investigating this 😆 I put it in the unit tests because I spotted the other _file_has_resolver test there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event_handlers size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Type annotated resolvers not found by OpenAPI merge

3 participants